//
//  MSSegmentView.h
//  ZXDemo
//
//  Created by 马胜 on 2017/5/16.
//  Copyright © 2017年 SnailMS. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "UILabel+Extension.h"
#import "NSString+Extension.h"
#import "MSMacrosMethods.h"

#define GetImage(imageName) [UIImage imageNamed:[NSString stringWithFormat:@"%@",imageName]]


typedef NS_ENUM(NSUInteger, MSSegmentBtnImageType) {
    MSSegmentBtnImageTypeLeft,
    MSSegmentBtnImageTypeTop,
    MSSegmentBtnImageTypeRight,
};

@protocol MSSegmentViewDelegate <NSObject>

@optional

- (void)itemDidSelectedWithIndex:(NSInteger)index;
- (void)itemDidSelectedWithIndex:(NSInteger)index withCurrentIndex:(NSInteger)currentIndex;

@end

@interface MSSegmentView : UIView

@property (nonatomic, weak) id<MSSegmentViewDelegate>delegate;

@property (nonatomic, assign) NSInteger currentItemIndex;

@property (nonatomic,assign) BOOL isFullScreen;
@property (nonatomic,assign) MSSegmentBtnImageType ImageType;
@property (nonatomic, strong) NSArray *itemTitles;
@property (nonatomic, strong) NSArray *itemImages;
@property (nonatomic, strong) UIColor *lineColor;
@property (nonatomic,assign) CGFloat lineExWidth;
@property (nonatomic,strong) UIColor *textColor;
@property (nonatomic,strong) UIColor *textSelColor;
@property (nonatomic,assign) UIFont *font;
@property (nonatomic,assign) UIFont *selFont;
@property (nonatomic,strong) UIColor *btnBackgroundColor;

@property (nonatomic,strong) UIColor *btnInLineColor;
@property (nonatomic,assign) CGFloat btnInLineHeight;

@property (nonatomic,strong) UIColor *downLineColor;

- (id)initWithFrame:(CGRect)frame;

- (void)updateData;
- (void)cleanData;

@end
